
public class Block {
	private String name;
	private int Location;
	private Estate estate;
	private Chance chance;
	private CommunityChest chest;
	private Tax tax;
	private Airport airport;
	private Utility utility;
	private Property property;
	
	public Block(String name, int Location){
		this.name = name;
		this.Location = Location;
	}
	
	public Block(CommunityChest chest){
		this.setChest(chest);
	}
	
	public Block(Estate estate){
		this.setEstate(estate);
	}
	
	public Block(Airport airport){
		this.setAirport(airport);
	}
	
	public Block(Utility utility){
		this.setUtility(utility);
	}
	
	public Block(Chance chance){
		this.setChance(chance);
	}
	
	public Block(Property p){
		this.setProperty(p);
	}
	
	public Block(Tax tax){
		this.setTax(tax);
	}
	
	public void setLocation(int location) {
		Location = location;
	}
	
	public int getLocation() {
		return Location;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getMyName() {
		return name;
	}

	public void setEstate(Estate estate) {
		this.estate = estate;
	}

	public Estate getEstate() {
		return estate;
	}

	public void setChance(Chance chance) {
		this.chance = chance;
	}

	public Chance getChance() {
		return chance;
	}

	public void setChest(CommunityChest chest) {
		this.chest = chest;
	}

	public CommunityChest getChest() {
		return chest;
	}

	public void setTax(Tax tax) {
		this.tax = tax;
	}

	public Tax getTax() {
		return tax;
	}

	public void setAirport(Airport airport) {
		this.airport = airport;
	}

	public Airport getAirport() {
		return airport;
	}

	public void setUtility(Utility utility) {
		this.utility = utility;
	}

	public Utility getUtility() {
		return utility;
	}

	public void setProperty(Property property) {
		this.property = property;
	}

	public Property getProperty() {
		return property;
	}
	
	public Property getTitle(int i){
		if(i == 5 || i == 15 || i == 25 || i == 35){
			return this.getAirport();
		}
		else if(i == 12 || i == 28){
			return this.getUtility();
		}
		else{
			return this.getEstate();
		}
	}
}
